package givenchy

  
class UserLogSet extends  HashSet{
 
    private Date last = new Date();

    public boolean contains(Object o){
        last = new Date();
        return super.contains(o);
    }

    public void sync(){
        Calendar calendar = Calendar.getInstance();
        calendar.add(Calendar.HOUR_OF_DAY, -1) 
           
        if (last.before(calendar.time) ) {
            clear();
        }
    }
 
 }